#include <stdio.h>
#include <stdbool.h>

int leap_days_cal(int year, int month, int day)
{
    int ret = 0;

    if(month == 1)                                                          //第一个月，多少号就是多少天
    {
        ret = day;
    }
    else if(month == 2)                                                     //2月，直接+31天即可
    {
        ret = 31 + day;
    }
    else if((year / 4 == 0 && year / 100 != 0) || year / 400 == 0)          //闰年
    {
        if(month == 3 || month == 5 || month == 7)                          //8月前的大月
        {
            ret = month / 2 * 31 + (month / 2 - 1) * 30 + 29 + day;
        }
        else if(month == 4 || month == 6)                                   //8月前的小月
        {
            ret = month / 2 * 31 + (month / 2 - 2) * 30 + 29 + day;
        }
        else if(month == 9 || month == 11)                                  //8月后的小月
        {
            ret = (month / 2 + 1) * 31 + (month / 2 - 2) * 30 + 29 + day;
        }
        else                                                                //8月后的大月
        {
            ret = month / 2 * 31 + (month / 2 - 2) * 30 + 29 + day;
        }
    }
    else                                                                    //平年
    {
        if(month == 3 || month == 5 || month == 7)                          //8月前的大月
        {
            ret = month / 2 * 31 + (month / 2 - 1) * 30 + 28 + day;
        }
        else if(month == 4 || month == 6)                                   //8月前的小月
        {
            ret = month / 2 * 31 + (month / 2 - 2) * 30 + 28 + day;
        }
        else if(month == 9 || month == 11)                                  //8月后的小月
        {
            ret = (month / 2 + 1) * 31 + (month / 2 - 2) * 30 + 28 + day;
        }
        else                                                                //8月后的大月
        {
            ret = month / 2 * 31 + (month / 2 - 2) * 30 + 28 + day;
        }
    }
    return ret;
}

bool if_leap(int year)
{
    if((year / 4 == 0 && year % 100 != 0) || year / 400 == 0)
        return true;
    else
        return false;
}

int main(void)
{
    int year, month, day, ret, i;

    printf("年 月 日\n");
    scanf("%d %d %d", &year, &month, &day);
    if(year <2011)
    {
        printf("err! year satart from 2011!\n");
        return 0;
    }

    ret = leap_days_cal(year, month, day);   
    for(i=2011; i<year; i++)
    {
        if(if_leap(i))
            ret += 366;
        else
            ret += 365;
    }
    printf("ret = %d\n", ret);
    if(ret % 5 >= 1 && ret % 5 <= 3)
        printf("打渔\n");
    else
        printf("晒网\n");
    return 0;
}
